<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>
		var arr=[1,2,3,4,5,6];
		function Pop(arr){
			var arr1=[];
			for (var i = 0; i < arr.length-1; i++) {
				arr1.push(arr[i]);	
			}
			console.log(arr1);
			console.log(arr[arr.length-1]);
		}
		Pop(arr);
	</script>
</head>
<body>
	
</body>
</html>